package com.storage.memory;


import com.wink.charity.Charity;
import com.wink.common.Identity;
import com.wink.dt.Comment;
import com.wink.dt.Topic;
import com.wink.event.Event;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class FakeData {
	
	public static List<Charity> generateCharities() {
		ArrayList<Charity> list = new ArrayList<Charity>();

		Charity b = new Charity();
		b.setName("Charity1");		
			Identity identity = new Identity();
			identity.setFromCommunity("ABPM");
			identity.setFromUser("PKR");
			identity.setDate(new Date());		
		b.setIdentity(identity);		
		b.setDescription("Sample Charity 1 created for demonstration");		
		list.add(b);
		
		b = new Charity();
		b.setName("Charity2");		
			Identity identity2 = new Identity();
			identity2.setFromCommunity("ABPM");
			identity2.setFromUser("MS");
			identity2.setDate(new Date());		
		b.setIdentity(identity2);		
		b.setDescription("Sample Charity 2 created for demonstration");		
		list.add(b);

		return list;
	}
	
	public static List<Event> generateEvents() {
		ArrayList<Event> list = new ArrayList<Event>();

		Event b = new Event();
		b.setCreated(new Date());
		b.setOwner("O1");
		b.setSubject("event1");
		b.setDescription("Sample event1 created for demonstration");
		b.setSpace("Event");
		list.add(b);
		
		b = new Event();
		b.setCreated(new Date());
		b.setOwner("O1");
		b.setSubject("event2");
		b.setDescription("Sample event2 created for demonstration");
		b.setSpace("Event");
		list.add(b);		

		return list;
	}
	
	public static List<Topic> generateTopics() {
		ArrayList<Topic> list = new ArrayList<Topic>();

		// create Topics 
		Topic t = new Topic();
		t.setTopicTitle("News");		
		t.setTopicdescription("NewsTopic");	
		
			// create Comment1 under Topic News
			Comment c = new Comment();
			c.setComment("News Comment 1");	
				Identity identity = new Identity();
				identity.setFromCommunity("from Community ABPM");
				identity.setFromUser("from User PRK");
				identity.setDate(new Date());
			c.setIdentity(identity);
			t.addToCommentList(c);
			
			c = new Comment();
			c.setComment("News Comment 2");	
				identity = new Identity();
				identity.setFromCommunity("from Community ABPM");
				identity.setFromUser("from User AVP");
				identity.setDate(new Date());
			c.setIdentity(identity);
			t.addToCommentList(c);
				
		list.add(t);			
		
		t = new Topic();
		t.setTopicTitle("Sports");		
		t.setTopicdescription("Sports Topic");		
		list.add(t);
		
		t = new Topic();
		t.setTopicTitle("Technology");		
		t.setTopicdescription("Technology Topic");		
		list.add(t);
				
			

		return list;
	}

}
